<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>更新影院-郫县电影</title>
<link rel="short icon"  href="/photo/head.png"/>
<style type="text/css">
	.left{    
		    width: 200px;
		    height: 750px;
		    float: left; 
		    background-color: #f4f3f4;
		    text-align: center;
		    border-right: 1px solid #d8d8d8;
	}
	.left h1 {
	    margin-top: 40px;
	    margin-bottom: 30px;
	    font-size: 22px;
	    color: #222;
	    font-weight: 400;
	}
	.right{
		position: absolute;
		left: 225px;
		top: 20px;
		border: 1px solid #d8d8d8;
	}
	body{
		border-top: 2px solid #d8d8d8;
		border-bottom: 2px solid #d8d8d8;
	}
	.left a {
	    display: block;
	    font-weight: 400;
	    color: #333;
	    height: 40px;
	    width: 202px;
	    margin-left: -1px;
	    line-height: 40px;
	    font-size: 18px;
	    text-decoration: none;
	}
	.left .active{
		color: #fff;
		background-color: #ed3931;
	}	
	.right>*{
		margin-left: 10px;
		margin-right: 10px;
	}
	table{
		border-spacing: 4px 10px;	
	}
	.right form {
	    padding: 0 0 20px 70px;
	    border-top: 2px solid #d8d8d8;
	}
	.right form>input {
	    margin-bottom: 10px;
	    padding: 1px;
	    width: 240px;
	    height: 15px;
	}
	.right form>select{
		margin-bottom: 10px;
	    padding: 1px;
	    width: 246px;
	    height: 21px;
	}
	.right form>input[type=date]{
		width: 120px;
	}
	.right form>input.time{
		width: 30px;
		margin-right: 5px;
	}
	.right form>input[type=submit] {
	    cursor: pointer;
	    border-radius: 5px;
	    width: 100px;
	    height: 40px;
	    color: #fff;
	    font-size: 18px;
	    line-height: 40px;
	    border: none;
	    background-color: #ed3931;
	    padding: 0;
	    
	}
	.left .updateMovie{
		color: #9b9191;
	} 
</style>
</head>
<body>
	<div class="left">
		<h1>电影排片</h1>
		
		<a href="/cinemaFindAll">基本信息</a>
		<a href="/cinemaFindAllFilm">排片信息</a>
		<a href="/cinemadelete">删除排片</a>
		<a href="/cinemainsert">添加排片</a>
		<a class="active">修改排片</a>
	</div>
	<div class="right">
		<div style="height: 10px"></div>
		<table>
			<thead>
				<tr>
					<th>电影开始时间</th>
					<th>电影名称</th>
					<th>影院</th>
					<th>影厅</th>
					<th>结束时间</th>
					<th>电影语言</th>
					<th>电影版本</th>
					<th>电影价格</th>
				</tr>
			</thead>
			<tbody>	
				<tr>		
					
					<td>${requestScope.cinema .filmBeginTimeString } &nbsp; ${requestScope.cinema.beginHour }:${requestScope.cinema.beginMin }</td>
					<td>${requestScope.cinema .film.filmName}</td>
					<td>${requestScope.cinema .cinemaName.cinemaName }</td>
					<td>${requestScope.cinema .hall.hallName }</td>		
					<td>${requestScope.cinema .filmEndTimeString } &nbsp; ${requestScope.cinema.endHour }:${requestScope.cinema.endMin }</td>
					<td>${requestScope.cinema .filmLanguage }</td>
					<td>${requestScope.cinema .filmVersion }</td>
					<td>${requestScope.cinema .price }</td>	
				</tr>
				</br>				
			</tbody>
		</table>
		<div style="height: 10px"></div>
		<form action="/cinemaupdate" method="post">
			<div style="height: 10px"></div>
			电影开始时间:&nbsp;<input type="date" name="filmBeginTime" value="${requestScope.cinema .filmBeginTimeString }"/>
						<input class="time" type="number" name="beginHour" value="${requestScope.cinema .beginHour }"/>时
						<input class="time" type="number" name="beginMin" value="${requestScope.cinema .beginMin }"/>分
						<br/>
			电影名称:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="text" name="movieId" value="${requestScope.cinema.film.filmName }" disabled="disabled"/><br/>
			<!--  影厅:<input type="text" name="hallName1" value="${requestScope.cinema .hall.hallName}"/><br/>-->
			影院:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="text" name="cinemaName1" value="${requestScope.cinema .cinemaName.cinemaName }" disabled="disabled"/><br/>
			
			影厅:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<select name="hallName1" >
					<c:forEach items="${requestScope.cinemaNames }" var="a">
					<c:choose>
						<c:when test="${requestScope.cinema .hall.hallName == a }">
							<option value="${a}" selected="selected" >${a}</option>
						</c:when>
						<c:otherwise>
							<option value="${a}" >${a}</option>
						</c:otherwise>
					</c:choose>
					</c:forEach>
			</select>
			</br>			
			结束时间:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="date" name="filmEndTime" value="${requestScope.cinema .filmEndTimeString }"/>
					<input class="time" type="number" name="endHour" value="${requestScope.cinema .endHour }"/>时
					<input class="time" type="number" name="endMin" value="${requestScope.cinema .endMin }"/>分
					<br/>
			电影语言:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="text" name="filmLanguage" value="${requestScope.cinema .filmLanguage }"/><br/>
			电影版本:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="text" name="filmVersion" value="${requestScope.cinema .filmVersion }"/><br/>		
			电影价格:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="number" name="price" value="${requestScope.cinema .price }"/><br/>			
			<input type="hidden" name="movieId" value="${requestScope.cinema .movieId }" /><br/>
			
			
			
			<input type="hidden" name="scheduleId" value="${requestScope.cinema .scheduleId }" />
			<input type="hidden" name="cinemaName1" value="${requestScope.cinema .cinemaName.cinemaName }" />
			<input type="submit" value="提交"/>
			<c:choose>
				<c:when test="${requestScope.cuowu == 1 }">
					&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:red">信息有误!</span>
				</c:when>
				<c:otherwise>
					<span></span>
				</c:otherwise>
			</c:choose>
		</form>
	</div>
</body>
</html>